
package com.snail.mobile.sim.oss.userInfo.dao;

import java.util.Collection;
import java.util.List;

import com.sungrid.seine.oss.framework.dao.BaseDao;
import com.snail.mobile.sim.oss.userInfo.model.UserInfo;

public interface UserInfoDao extends BaseDao 
{
    /**
     * Gets userInfo's information based on primary key. An
     * ObjectRetrievalFailureException Runtime Exception is thrown if 
     * nothing is found.
     * 
     * @param nid the userInfo's nid
     * @return userInfo populated userInfo object
     */
    public UserInfo getUserInfo(final Integer nid);
    

    /**
     * Gets userInfo's information based on primary key. An
     * ObjectRetrievalFailureException Runtime Exception is thrown if 
     * nothing is found.
     * 
     * @param nid the userInfo's nid
     * @return userInfo populated userInfo object
     */
    public UserInfo getUserInfoSimple(final Integer nid);

    /**
     * Saves a userInfo's information
     * @param userInfo the object to be saved
     */    
    public void saveUserInfo(UserInfo userInfo);

    /**
     * Saves or Updates a userInfo's information
     * @param userInfo the object to be saved
     */    
    public void saveOrUpdateUserInfo(UserInfo userInfo);

    /**
     * Removes a userInfo from the database by nid
     * @param nid the userInfo's nid
     */
    public void removeUserInfo(final Integer nid);

    /**
     * Retrieves all of the userInfos
     */
    public List getUserInfos(UserInfo userInfo);

    /**
     * Removes the userInfos from the database
     * @param userInfos the userInfos to be removed
     */
    public void removeUserInfos(final Collection userInfos);

    /**
     * Saves the userInfos from the database
     * @param userInfos the userInfos to be saved
     */
    public void saveUserInfos(final Collection userInfos);
}